home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / esc.jar / com / extensibility / app / DocumentPreferences.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-30  |  1.8 KB  |  50 lines

  1. package com.extensibility.app;
  2.  
  3. public class DocumentPreferences extends BaseInfo {
  4.    protected static final String LOG_CHANGES = (new String("LOG_CHANGES")).intern();
  5.    protected static final String PROMPT_WHEN_SAVING = (new String("PROMPT_WHEN_SAVING")).intern();
  6.    protected static final String NAME_DEFAULT = (new String("NAME_DEFAULT")).intern();
  7.  
  8.    public static DocumentPreferences createDocumentPreferences(String var0) {
  9.       DocumentPreferences var1 = new DocumentPreferences(var0);
  10.       return var1.invalid ? null : var1;
  11.    }
  12.  
  13.    private DocumentPreferences(String var1) {
  14.       super(var1);
  15.    }
  16.  
  17.    public DocumentPreferences() {
  18.       this(false, false);
  19.    }
  20.  
  21.    public DocumentPreferences(boolean var1, boolean var2) {
  22.       super.properties.put(LOG_CHANGES, var1 ? Boolean.TRUE.toString() : Boolean.FALSE.toString());
  23.       super.properties.put(PROMPT_WHEN_SAVING, var2 ? Boolean.TRUE.toString() : Boolean.FALSE.toString());
  24.    }
  25.  
  26.    public boolean getPromptForVersionInfo() {
  27.       return ((BaseInfo)this).getBoolean(PROMPT_WHEN_SAVING);
  28.    }
  29.  
  30.    public void setPromptForVersionInfo(boolean var1) {
  31.       super.properties.put(PROMPT_WHEN_SAVING, var1 ? Boolean.TRUE.toString() : Boolean.FALSE.toString());
  32.    }
  33.  
  34.    public boolean getChangeLogging() {
  35.       return ((BaseInfo)this).getBoolean(LOG_CHANGES);
  36.    }
  37.  
  38.    public void setChangeLogging(boolean var1) {
  39.       super.properties.put(LOG_CHANGES, var1 ? Boolean.TRUE.toString() : Boolean.FALSE.toString());
  40.    }
  41.  
  42.    public String getNameDefault() {
  43.       return ((BaseInfo)this).getString(NAME_DEFAULT);
  44.    }
  45.  
  46.    public void setNameDefault(String var1) {
  47.       super.properties.put(NAME_DEFAULT, var1);
  48.    }
  49. }
  50.